package com.ky.tms.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.List;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author chengkaimao
 * @since 2020-05-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tms_car")
public class TmsCar implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 车牌号
     */
    private String carNo;

    /**
     * 当前公里数
     */
    private BigDecimal kilometres;

    /**
     * 车型
     */
    private String carType;

    /**
     * 行驶证编号
     */
    private String drLicNo;

    /**
     * 行驶证发证日期
     */
    private LocalDate drLicSendDate;

    /**
     * 行驶证注册日期
     */
    private LocalDate drLicRegDate;

    /**
     * 年检日期
     */
    private LocalDate annualDate;

    /**
     * 强制报废日期
     */
    private LocalDate scrapDate;

    /**
     * 登记证书
     */
    private String regCer;

    /**
     * 运输证
     */
    private String tranCer;

    /**
     * 被保险人
     */
    private String insureName;

    /**
     * 归属
     */
    private String affiliate;

    /**
     * 项目
     */
    private String projects;

    /**
     * 交强险到期日期
     */
    private LocalDate insureTraffic;

    /**
     * 第三方责任险到期日期
     */
    @TableField(value = "insure_third",strategy = FieldStrategy.IGNORED)
    private LocalDate insureThird;

    /**
     * 备注
     */
    private String remark;

    /**
     * 是否有效
     */
    private Integer isValid;

    /**
     * 是否锁定
     */
    private Integer isLock;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 创建人
     */
    private String createUser;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    /**
     * 备注
     */
    private String updateUser;

    @TableField(exist = false)
    private String flag;

    @TableField(exist = false)
    private String annualDateStr;

    @TableField(exist = false)
    private String scrapDateStr;

    @TableField(exist = false)
    private String insureDateStr;

    @TableField(exist = false)
    private String insureThirdStr;

    @TableField(exist = false)
    private String insureTrafficStr;

    @TableField(exist = false)
    private String insureType;

    @TableField(exist = false)
    private List<TmsCarOil> oils;

    @TableField(exist = false)
    private List<TmsCarInsure> insures;


}
